﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AVTracker.Data;
using AVTracker.Models;

namespace AVTracker.Controllers
{
    public class VehicleController : ApiController
    {
        // GET api/vehicle
        public IEnumerable<Vehicle> Get()
        {
            return VehicleAdapter.GetVehicles()
                .OrderBy(v => v.VehicleId);
            //.Where(v => v.UserId == User.Identity.Name)
        }

        public IEnumerable<VehicleLocation> GetLocation(long id)
        {
            return VehicleAdapter.GetVehicleLocation(id);
        }
    }
}
